import type { ProjectConfig } from "#/config";
import { PermissionModeEnum, SessionTimeoutProcessingEnum } from "@/models/enums/app";
import { CacheTypeEnum } from "@/models/enums/cache";

/** 项目设置 */
const projectSetting: ProjectConfig = {
  /** 使用自定义错误日志处理方法 */
  useErrorHandle: false,
  /** 会话超时处理 */
  sessionTimeoutProcessing: SessionTimeoutProcessingEnum.ROUTE_JUMP,
  /** 与权限相关的缓存存储在sessionStorage或localStorage中 */
  permissionCacheType: CacheTypeEnum.SESSION,
  // 权限模式
  permissionMode: PermissionModeEnum.ROUTE_MAPPING,
  menuSetting: { collapsed: true, menuWidth: 320 },
  headerSetting: { height: 64 },
};

/** 默认缓存时间 */
export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7;

export default projectSetting;
